from aip import AipNlp

""" 你的 APPID AK SK """
APP_ID = '11616369'
API_KEY = 'ItNkF4MkvGG7ICcigDI7lTUf'
SECRET_KEY = 'xEMbajscGyG4q2gK41G2GWYxday2atQU'

client = AipNlp(APP_ID, API_KEY, SECRET_KEY)

text1 = "浙富股份"

text2 = "万事通自考网"

""" 调用短文本相似度 """
client.simnet(text1, text2);

""" 如果有可选参数 """
options = {}
options["model"] = "CNN"

""" 带参数调用短文本相似度 """
client.simnet(text1, text2, options)
print(client.simnet(text1, text2, options))
